using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DemoWebapi01.Entities
{
    /// <summary>
    /// 问题实体类
    /// </summary>
    public class Question : BaseEntity
    {
        public required string Content { get; set; }

        public string? ContentCN { get; set; }

        public string QuestionType { get; set; } = "single_choice";// 'single_choice', 'multiple_choice', 'true_false', 'fill_blank', 'short_answer'

        public string Difficulty { get; set; } = "medium"; // 'easy', 'medium', 'hard'
        /// <summary>
        /// 解析
        /// </summary>
        public string? Explanation { get; set; }

        public string? ExplanationCN { get; set; }

        public string Status { get; set; } = "active"; // 'active', 'inactive', 'pending_review'
        public Guid CategoryId { get; set; }
        public virtual Category? Category { get; set; }
        public virtual ICollection<QuestionOption> QuestionOptions { get; set; } = [];
    }

    /// <summary>
    /// 问题类型枚举
    /// </summary>
    public static class QuestionType
    {
        public const string SingleChoice = "single_choice";
        public const string MultipleChoice = "multiple_choice";
        public const string TrueFalse = "true_false";
        public const string FillBlank = "fill_blank";
        public const string ShortAnswer = "short_answer";
    }

    /// <summary>
    /// 问题难度枚举
    /// </summary>
    public static class QuestionDifficulty
    {
        public const string Easy = "easy";
        public const string Medium = "medium";
        public const string Hard = "hard";
    }

}